home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.004 / xemacs-1 / xemacs-19.13 / src / frame-x.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-04  |  5.8 KB  |  166 lines

  1. /* Define X specific frame object for XEmacs.
  2.    Copyright (C) 1989, 1992, 1993 1994 Free Software Foundation, Inc.
  3.    Copyright (C) 1994, 1995 Board of Trustees, University of Illinois
  4.    Copyright (C) 1994, 1995 Amdahl Corporation
  5.  
  6. This file is part of XEmacs.
  7.  
  8. XEmacs is free software; you can redistribute it and/or modify it
  9. under the terms of the GNU General Public License as published by the
  10. Free Software Foundation; either version 2, or (at your option) any
  11. later version.
  12.  
  13. XEmacs is distributed in the hope that it will be useful, but WITHOUT
  14. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16. for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with XEmacs; see the file COPYING.  If not, write to the Free
  20. Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  21.  
  22. /* Synched up with: Not in FSF. */
  23.  
  24. #ifndef _XEMACS_FRAME_X_H_
  25. #define _XEMACS_FRAME_X_H_
  26.  
  27. #ifdef HAVE_X_WINDOWS
  28.  
  29. #include "frame.h"
  30.  
  31. /* The maximum number of widgets that can be displayed above the text
  32.    area at one time.  Currently no more than 3 will ever actually be
  33.    displayed (menubar, psheet, debugger panel). */
  34. #define MAX_CONCURRENT_TOP_WIDGETS 8
  35.  
  36. /* Each X frame object points to its own struct x_frame object
  37.    in the display.x field.  The x_frame structure contains all
  38.    the information that is specific to X windows.  */
  39.  
  40. struct x_frame
  41. {
  42.   /* The widget of this frame.  This is an EmacsShell or an
  43.      ExternalShell. */
  44.   Widget widget;
  45.  
  46.   /* The parent of the EmacsFrame, the menubar, and the scrollbars.
  47.      This is an EmacsManager. */
  48.   Widget container;
  49.  
  50.   /* The widget of the menubar, of whatever widget class it happens to be. */
  51.   Widget menubar_widget;
  52.  
  53.   /* The widget of the edit portion of this frame; this is an EmacsFrame,
  54.      and the window of this widget is what the redisplay code draws on. */
  55.   Widget edit_widget;
  56.  
  57.   /* Lists the widgets above the text area, in the proper order.
  58.      Used by the EmacsManager. */
  59.   Widget top_widgets[MAX_CONCURRENT_TOP_WIDGETS];
  60.   int num_top_widgets;
  61.  
  62. #ifdef ENERGIZE
  63.   /* The Energize property-sheets.  The current_ slots are the ones which are
  64.      actually on the frame.  The desired_ slots are the ones which should
  65.      be there.  Redisplay synchs these.
  66.    */
  67.   int *current_psheets;
  68.   int *desired_psheets;
  69.   int current_psheet_count;
  70.   int desired_psheet_count;
  71.   Lisp_Object current_psheet_buffer;
  72.   Lisp_Object desired_psheet_buffer;
  73. #endif
  74.  
  75.   /*************************** Miscellaneous **************************/
  76.  
  77.   /* The icon pixmaps; these are Lisp_Image_Instance objects, or Qnil. */
  78.   Lisp_Object icon_pixmap;
  79.   Lisp_Object icon_pixmap_mask;
  80.  
  81.   /* We don't provide a mechanism for changing these are they are
  82.      initialized so we might as well keep pointers to them and avoid
  83.      lots of expensive calls to gc_cache_lookup. */
  84.   GC toolbar_top_shadow_gc;
  85.   GC toolbar_bottom_shadow_gc;
  86.   GC toolbar_blank_background_gc;
  87.   GC toolbar_pixmap_background_gc;
  88.  
  89.   /* geometry string that ought to be freed. */
  90.   char *geom_free_me_please;
  91.  
  92. #ifdef I18N4
  93.   XIC input_context;
  94. #endif 
  95.  
  96.   /* 1 if the frame is completely visible on the display, 0 otherwise.
  97.      if 0 the frame may have been iconified or may be totally
  98.      or partially hidden by another X window */
  99.   int totally_visible_p :1;
  100.  
  101.   /* NB: Both of the following flags are derivable from the 'shell'
  102.      field above, but it's easier if we also have them separately here. */
  103.  
  104.   /* Are we a top-level frame?  This means that our shell is a
  105.      TopLevelShell, and we should do certain things to interact with
  106.      the window manager. */
  107.   int top_level_frame_p :1;
  108.  
  109. #ifdef EXTERNAL_WIDGET
  110.   /* Are we using somebody else's window for our shell window?  This
  111.      means that our shell is an ExternalShell.  If this flag is set, then
  112.      `top_level_frame_p' will never be set. */
  113.   int external_window_p :1;
  114. #endif /* EXTERNAL_WIDGET */
  115. };
  116.  
  117. #define FRAME_X_DATA(f) ((struct x_frame *) ((f)->frame_data))
  118.  
  119. #define FRAME_X_SHELL_WIDGET(f) (FRAME_X_DATA (f)->widget)
  120. #define FRAME_X_CONTAINER_WIDGET(f) (FRAME_X_DATA (f)->container)
  121. #define FRAME_X_MENUBAR_WIDGET(f) (FRAME_X_DATA (f)->menubar_widget)
  122. #define FRAME_X_TEXT_WIDGET(f) (FRAME_X_DATA (f)->edit_widget)
  123. #define FRAME_X_TOP_WIDGETS(f) (FRAME_X_DATA (f)->top_widgets)
  124. #define FRAME_X_NUM_TOP_WIDGETS(f) (FRAME_X_DATA (f)->num_top_widgets)
  125.  
  126. #ifdef ENERGIZE
  127. #define FRAME_X_CURRENT_PSHEETS(f) (FRAME_X_DATA (f)->current_psheets)
  128. #define FRAME_X_DESIRED_PSHEETS(f) (FRAME_X_DATA (f)->desired_psheets)
  129. #define FRAME_X_CURRENT_PSHEET_COUNT(f) \
  130.   (FRAME_X_DATA (f)->current_psheet_count)
  131. #define FRAME_X_DESIRED_PSHEET_COUNT(f) \
  132.   (FRAME_X_DATA (f)->desired_psheet_count)
  133. #define FRAME_X_CURRENT_PSHEET_BUFFER(f) \
  134.   (FRAME_X_DATA (f)->current_psheet_buffer)
  135. #define FRAME_X_DESIRED_PSHEET_BUFFER(f) \
  136.   (FRAME_X_DATA (f)->desired_psheet_buffer)
  137. #endif
  138.  
  139. #define FRAME_X_ICON_PIXMAP(f) (FRAME_X_DATA (f)->icon_pixmap)
  140. #define FRAME_X_ICON_PIXMAP_MASK(f) (FRAME_X_DATA (f)->icon_pixmap_mask)
  141.  
  142. #define FRAME_X_TOOLBAR_TOP_SHADOW_GC(f) \
  143.   (FRAME_X_DATA (f)->toolbar_top_shadow_gc)
  144. #define FRAME_X_TOOLBAR_BOTTOM_SHADOW_GC(f) \
  145.   (FRAME_X_DATA (f)->toolbar_bottom_shadow_gc)
  146. #define FRAME_X_TOOLBAR_BLANK_BACKGROUND_GC(f) \
  147.   (FRAME_X_DATA (f)->toolbar_blank_background_gc)
  148. #define FRAME_X_TOOLBAR_PIXMAP_BACKGROUND_GC(f) \
  149.   (FRAME_X_DATA (f)->toolbar_pixmap_background_gc)
  150.  
  151. #define FRAME_X_GEOM_FREE_ME_PLEASE(f) (FRAME_X_DATA (f)->geom_free_me_please)
  152.  
  153. #define FRAME_X_TOTALLY_VISIBLE_P(f) (FRAME_X_DATA (f)->totally_visible_p)
  154. #define FRAME_X_TOP_LEVEL_FRAME_P(f) (FRAME_X_DATA (f)->top_level_frame_p)
  155.  
  156. #ifdef EXTERNAL_WIDGET
  157. #define FRAME_X_EXTERNAL_WINDOW_P(f) (FRAME_X_DATA (f)->external_window_p)
  158. #endif
  159.  
  160. #ifdef I18N4
  161. #define FRAME_X_INPUT_CONTEXT(f) (FRAME_X_DATA (f)->input_context)
  162. #endif
  163.  
  164. #endif /* HAVE_X_WINDOWS */
  165. #endif /* _XEMACS_FRAME_X_H_ */
  166.